public class Test {
    public static void main(String[] args) {
        MyLinkedList myLinkedList1 = new MyLinkedList();
        myLinkedList1.addLast(2);
        myLinkedList1.addLast(2);
        myLinkedList1.addLast(2);
        myLinkedList1.addLast(2);
        myLinkedList1.insertIndex(0,99);
        myLinkedList1.insertIndex(4,9);
        myLinkedList1.insertIndex(6,9);
        myLinkedList1.insertIndex(3,19);
        System.out.println(myLinkedList1.size());
        myLinkedList1.display();
    }
    public static void main2(String[] args) {
        MyLinkedList myLinkedList1 = new MyLinkedList();
        myLinkedList1.addLast(2);
        myLinkedList1.addLast(2);
        myLinkedList1.addLast(2);
        myLinkedList1.addLast(2);
        myLinkedList1.addLast(2);
        myLinkedList1.addLast(2);
        System.out.println(myLinkedList1.size());
        myLinkedList1.display();
        myLinkedList1.removeAll(2);
        myLinkedList1.display();

    }
    public static void main1(String[] args) {
        MyLinkedList myLinkedList1 = new MyLinkedList();
        myLinkedList1.addFirst(1);
        myLinkedList1.addFirst(2);
        myLinkedList1.addFirst(3);
        myLinkedList1.addLast(1);
        myLinkedList1.addLast(2);
        myLinkedList1.addLast(3);
        myLinkedList1.remove(2);
        myLinkedList1.remove(3);
        myLinkedList1.remove(3);
        myLinkedList1.remove(1);
        myLinkedList1.remove(1);
        myLinkedList1.remove(2);
        System.out.println(myLinkedList1.size());
        myLinkedList1.display();
        System.out.println(myLinkedList1.contain(2));
    }
}
